<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition>

        <p:dialog id="SocioEditDlg" widgetVar="SocioEditDialog" modal="true" resizable="false" appendToBody="true" header="#{bundle.EditSocioTitle}">

            <h:form id="SocioEditForm">

                <h:panelGroup id="display">
                    <p:panelGrid  columns="2" rendered="#{socioController.selected != null}">

                        <h:outputLabel value="#{bundle.EditSocioLabel_id}" for="id" />
                        <h:outputText id="id" value="#{socioController.selected.id}" />

                        <p:outputLabel value="#{bundle.EditSocioLabel_codigo}" for="codigo" />
                        <p:inputText id="codigo" value="#{socioController.selected.codigo}" title="#{bundle.EditSocioTitle_codigo}" required="true" requiredMessage="#{bundle.EditSocioRequiredMessage_codigo}"/>

                        <p:outputLabel value="#{bundle.EditSocioLabel_activo}" for="activo" />
                        <p:selectBooleanCheckbox id="activo" value="#{socioController.selected.activo}" title="#{bundle.EditSocioTitle_activo}" required="true" requiredMessage="#{bundle.EditSocioRequiredMessage_activo}"/>

                        <p:outputLabel value="#{bundle.EditSocioLabel_creationDate}" for="creationDate" />
                        <p:calendar id="creationDate" pattern="MM/dd/yyyy HH:mm:ss" value="#{socioController.selected.creationDate}" title="#{bundle.EditSocioTitle_creationDate}" required="true" requiredMessage="#{bundle.EditSocioRequiredMessage_creationDate}" showOn="button"/>

                        <p:outputLabel value="#{bundle.EditSocioLabel_createdBy}" for="createdBy" />
                        <p:inputText id="createdBy" value="#{socioController.selected.createdBy}" title="#{bundle.EditSocioTitle_createdBy}" required="true" requiredMessage="#{bundle.EditSocioRequiredMessage_createdBy}"/>

                        <p:outputLabel value="#{bundle.EditSocioLabel_lastUpdateDate}" for="lastUpdateDate" />
                        <p:calendar id="lastUpdateDate" pattern="MM/dd/yyyy HH:mm:ss" value="#{socioController.selected.lastUpdateDate}" title="#{bundle.EditSocioTitle_lastUpdateDate}"  showOn="button"/>

                        <p:outputLabel value="#{bundle.EditSocioLabel_lastUpdateBy}" for="lastUpdateBy" />
                        <p:inputText id="lastUpdateBy" value="#{socioController.selected.lastUpdateBy}" title="#{bundle.EditSocioTitle_lastUpdateBy}" required="true" requiredMessage="#{bundle.EditSocioRequiredMessage_lastUpdateBy}"/>

                        <p:outputLabel value="#{bundle.EditSocioLabel_personaId}" for="personaId" />
                        <p:selectOneMenu id="personaId" value="#{socioController.selected.personaId}" required="true" requiredMessage="#{bundle.EditSocioRequiredMessage_personaId}">
                            <f:selectItem itemLabel="#{bundle.SelectOneMessage}"/>
                            <f:selectItems value="#{personaController.items}"
                                           var="personaIdItem"
                                           itemValue="#{personaIdItem}"
                                           itemLabel="#{personaIdItem.id.toString()}"
                                           />
                            <f:converter binding="#{personaConverter}"/>
                        </p:selectOneMenu>
                    </p:panelGrid>
                    <p:commandButton actionListener="#{socioController.save}" value="#{bundle.Save}" update="display,:SocioListForm:datalist,:growl" oncomplete="handleSubmit(xhr,status,args,SocioEditDialog);"/>
                    <p:commandButton value="#{bundle.Cancel}" onclick="SocioEditDialog.hide()"/>
                </h:panelGroup>

            </h:form>

        </p:dialog>

    </ui:composition>

</html>
